package com.wuliang.generate.bean.entities.system;

import com.google.gson.annotations.Expose;
import com.wuliang.generate.common.core.basic.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.context.annotation.Lazy;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author WuLiang
 */
@Data
@Lazy
@Entity
@Builder
@Cacheable
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("系统代码模板")
@EqualsAndHashCode(callSuper = true)
@Table(name = "t_system_template", schema = "wuliang_generate_system")
public class SystemTemplate extends BasicEntity {

    @Expose
    @Column(name = "template_name", columnDefinition = "varchar(255) default '' comment '模板别名'")
    @ApiModelProperty(name = "templateName", value = "模板名称", dataType = "string")
    private String templateName;

    @Expose
    @Column(name = "template_package_path", columnDefinition = "varchar(255) default '' comment '代码生成后存放的路径'")
    @ApiModelProperty(name = "templatePackagePath", value = "代码生成后存放的路径", dataType = "string")
    private String templatePackagePath;

    @Expose
    @Column(name = "template_content", columnDefinition = "text null comment '模板内容'")
    @ApiModelProperty(name = "templateContent", value = "模板内容", dataType = "string")
    private String templateContent;

}
